Fully Qualified Name: | Laminas\InputFilter\FileInput |
Extends: | Input |
FileInput is a special Input type for handling uploaded files.
It differs from Input in a few ways:
It expects the raw value to either be in the $_FILES array format, or an array of PSR-7 UploadedFileInterface instances.
The validators are run before the filters (the opposite behavior of Input). This is so validation can be run prior to any filters that may rename/move/modify the file.
Instead of adding a NotEmpty validator, it will (by default) automatically add a Laminas\Validator\File\Upload validator.
Name | Description | Defined By |
---|---|---|
__construct() | Input | |
allowEmpty() | Input | |
breakOnFailure() | Input | |
clearFallbackValue() | Input | |
continueIfEmpty() | Input | |
getAutoPrependUploadValidator() | FileInput | |
getErrorMessage() | Input | |
getFallbackValue() | Input | |
getFilterChain() | Input | |
getMessages() | Input | |
getName() | Input | |
getRawValue() | Input | |
getValidatorChain() | Input | |
getValue() | FileInput | |
hasFallback() | Input | |
hasValue() | Flag for inform if input value was set. | Input |
isEmptyFile() | Checks if the raw input value is an empty file input eg: no file was uploaded | FileInput |
isRequired() | Input | |
isValid() | FileInput | |
merge() | FileInput | |
resetValue() | FileInput | |
setAllowEmpty() | Input | |
setAutoPrependUploadValidator() | FileInput | |
setBreakOnFailure() | Input | |
setContinueIfEmpty() | Input | |
setErrorMessage() | Input | |
setFallbackValue() | Input | |
setFilterChain() | Input | |
setName() | Input | |
setRequired() | Input | |
setValidatorChain() | Input | |
setValue() | FileInput |
Parameter Name | Type | Description |
---|---|---|
$name |
Returns: void
Returns: bool
Returns: bool
Returns: void
Returns: bool
Returns: bool
Returns: string|null
Returns: mixed
Returns: \FilterChain
Returns: string[]
Returns: string
Returns: mixed
Returns: \ValidatorChain
Returns: mixed
Returns: bool
Flag for inform if input value was set.
This flag used for distinguish when {@link Input::getValue()} will return the value previously set or the default.
Returns: bool
Checks if the raw input value is an empty file input eg: no file was uploaded
Parameter Name | Type | Description |
---|---|---|
$rawValue | ||
$rawValue |
Returns: bool
Returns: bool
Parameter Name | Type | Description |
---|---|---|
$context | mixed | Extra |
Returns: bool
Parameter Name | Type | Description |
---|---|---|
$input | \InputInterface |
Returns: \FileInput
Returns: void
Parameter Name | Type | Description |
---|---|---|
$allowEmpty | bool |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$value | bool | Enable/Disable |
Returns: \FileInput
Parameter Name | Type | Description |
---|---|---|
$breakOnFailure | bool |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$continueIfEmpty | bool |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$errorMessage | string|null |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$value | mixed |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$filterChain | \FilterChain |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$required | bool |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$validatorChain | \ValidatorChain |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$value | array|\UploadedFile |
Returns: \Input